package chpt02;

import java.util.Scanner;
import java.lang.StringBuffer;

public class StringBuilder {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		String str = "";
		StringBuffer s=new StringBuffer();
		s.append(str);
		for(int i=0;i<n;i++){
			s.append(i);
		}
		System.out.println(s);
		int x=sc.nextInt();
		int y=sc.nextInt();
		System.out.println(s.substring(x, y));
		sc.close();
	}

}
